(0) Obligation:

Clauses:

p(a, b).
p(b, c).
tc(X, X).
tc(X, Y) :- ','(p(X, Z), tc(Z, Y)).

Query: tc(g,a)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

tcA(c).
tcB(b).
tcB(T15) :- tcA(T15).
tcC(T4, T4).
tcC(a, T9) :- tcB(T9).
tcC(b, T9) :- tcA(T9).
tcC(a, T28) :- tcB(T28).
tcC(b, T28) :- tcA(T28).

Query: tcC(g,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
tcC_in: (b,f)
tcB_in: (f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

tcC_in_ga(T4, T4) → tcC_out_ga(T4, T4)
tcC_in_ga(a, T9) → U2_ga(T9, tcB_in_a(T9))
tcB_in_a(b) → tcB_out_a(b)
tcB_in_a(T15) → U1_a(T15, tcA_in_a(T15))
tcA_in_a(c) → tcA_out_a(c)
U1_a(T15, tcA_out_a(T15)) → tcB_out_a(T15)
U2_ga(T9, tcB_out_a(T9)) → tcC_out_ga(a, T9)
tcC_in_ga(b, T9) → U3_ga(T9, tcA_in_a(T9))
U3_ga(T9, tcA_out_a(T9)) → tcC_out_ga(b, T9)
tcC_in_ga(a, T28) → U4_ga(T28, tcB_in_a(T28))
U4_ga(T28, tcB_out_a(T28)) → tcC_out_ga(a, T28)
tcC_in_ga(b, T28) → U5_ga(T28, tcA_in_a(T28))
U5_ga(T28, tcA_out_a(T28)) → tcC_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tcC_in_ga(x1, x2)  =  tcC_in_ga(x1)
tcC_out_ga(x1, x2)  =  tcC_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tcB_in_a(x1)  =  tcB_in_a
tcB_out_a(x1)  =  tcB_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tcA_in_a(x1)  =  tcA_in_a
tcA_out_a(x1)  =  tcA_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

tcC_in_ga(T4, T4) → tcC_out_ga(T4, T4)
tcC_in_ga(a, T9) → U2_ga(T9, tcB_in_a(T9))
tcB_in_a(b) → tcB_out_a(b)
tcB_in_a(T15) → U1_a(T15, tcA_in_a(T15))
tcA_in_a(c) → tcA_out_a(c)
U1_a(T15, tcA_out_a(T15)) → tcB_out_a(T15)
U2_ga(T9, tcB_out_a(T9)) → tcC_out_ga(a, T9)
tcC_in_ga(b, T9) → U3_ga(T9, tcA_in_a(T9))
U3_ga(T9, tcA_out_a(T9)) → tcC_out_ga(b, T9)
tcC_in_ga(a, T28) → U4_ga(T28, tcB_in_a(T28))
U4_ga(T28, tcB_out_a(T28)) → tcC_out_ga(a, T28)
tcC_in_ga(b, T28) → U5_ga(T28, tcA_in_a(T28))
U5_ga(T28, tcA_out_a(T28)) → tcC_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tcC_in_ga(x1, x2)  =  tcC_in_ga(x1)
tcC_out_ga(x1, x2)  =  tcC_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tcB_in_a(x1)  =  tcB_in_a
tcB_out_a(x1)  =  tcB_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tcA_in_a(x1)  =  tcA_in_a
tcA_out_a(x1)  =  tcA_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

TCC_IN_GA(a, T9) → U2_GA(T9, tcB_in_a(T9))
TCC_IN_GA(a, T9) → TCB_IN_A(T9)
TCB_IN_A(T15) → U1_A(T15, tcA_in_a(T15))
TCB_IN_A(T15) → TCA_IN_A(T15)
TCC_IN_GA(b, T9) → U3_GA(T9, tcA_in_a(T9))
TCC_IN_GA(b, T9) → TCA_IN_A(T9)
TCC_IN_GA(a, T28) → U4_GA(T28, tcB_in_a(T28))
TCC_IN_GA(b, T28) → U5_GA(T28, tcA_in_a(T28))

The TRS R consists of the following rules:

tcC_in_ga(T4, T4) → tcC_out_ga(T4, T4)
tcC_in_ga(a, T9) → U2_ga(T9, tcB_in_a(T9))
tcB_in_a(b) → tcB_out_a(b)
tcB_in_a(T15) → U1_a(T15, tcA_in_a(T15))
tcA_in_a(c) → tcA_out_a(c)
U1_a(T15, tcA_out_a(T15)) → tcB_out_a(T15)
U2_ga(T9, tcB_out_a(T9)) → tcC_out_ga(a, T9)
tcC_in_ga(b, T9) → U3_ga(T9, tcA_in_a(T9))
U3_ga(T9, tcA_out_a(T9)) → tcC_out_ga(b, T9)
tcC_in_ga(a, T28) → U4_ga(T28, tcB_in_a(T28))
U4_ga(T28, tcB_out_a(T28)) → tcC_out_ga(a, T28)
tcC_in_ga(b, T28) → U5_ga(T28, tcA_in_a(T28))
U5_ga(T28, tcA_out_a(T28)) → tcC_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tcC_in_ga(x1, x2)  =  tcC_in_ga(x1)
tcC_out_ga(x1, x2)  =  tcC_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tcB_in_a(x1)  =  tcB_in_a
tcB_out_a(x1)  =  tcB_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tcA_in_a(x1)  =  tcA_in_a
tcA_out_a(x1)  =  tcA_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)
TCC_IN_GA(x1, x2)  =  TCC_IN_GA(x1)
U2_GA(x1, x2)  =  U2_GA(x2)
TCB_IN_A(x1)  =  TCB_IN_A
U1_A(x1, x2)  =  U1_A(x2)
TCA_IN_A(x1)  =  TCA_IN_A
U3_GA(x1, x2)  =  U3_GA(x2)
U4_GA(x1, x2)  =  U4_GA(x2)
U5_GA(x1, x2)  =  U5_GA(x2)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

TCC_IN_GA(a, T9) → U2_GA(T9, tcB_in_a(T9))
TCC_IN_GA(a, T9) → TCB_IN_A(T9)
TCB_IN_A(T15) → U1_A(T15, tcA_in_a(T15))
TCB_IN_A(T15) → TCA_IN_A(T15)
TCC_IN_GA(b, T9) → U3_GA(T9, tcA_in_a(T9))
TCC_IN_GA(b, T9) → TCA_IN_A(T9)
TCC_IN_GA(a, T28) → U4_GA(T28, tcB_in_a(T28))
TCC_IN_GA(b, T28) → U5_GA(T28, tcA_in_a(T28))

The TRS R consists of the following rules:

tcC_in_ga(T4, T4) → tcC_out_ga(T4, T4)
tcC_in_ga(a, T9) → U2_ga(T9, tcB_in_a(T9))
tcB_in_a(b) → tcB_out_a(b)
tcB_in_a(T15) → U1_a(T15, tcA_in_a(T15))
tcA_in_a(c) → tcA_out_a(c)
U1_a(T15, tcA_out_a(T15)) → tcB_out_a(T15)
U2_ga(T9, tcB_out_a(T9)) → tcC_out_ga(a, T9)
tcC_in_ga(b, T9) → U3_ga(T9, tcA_in_a(T9))
U3_ga(T9, tcA_out_a(T9)) → tcC_out_ga(b, T9)
tcC_in_ga(a, T28) → U4_ga(T28, tcB_in_a(T28))
U4_ga(T28, tcB_out_a(T28)) → tcC_out_ga(a, T28)
tcC_in_ga(b, T28) → U5_ga(T28, tcA_in_a(T28))
U5_ga(T28, tcA_out_a(T28)) → tcC_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tcC_in_ga(x1, x2)  =  tcC_in_ga(x1)
tcC_out_ga(x1, x2)  =  tcC_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tcB_in_a(x1)  =  tcB_in_a
tcB_out_a(x1)  =  tcB_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tcA_in_a(x1)  =  tcA_in_a
tcA_out_a(x1)  =  tcA_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)
TCC_IN_GA(x1, x2)  =  TCC_IN_GA(x1)
U2_GA(x1, x2)  =  U2_GA(x2)
TCB_IN_A(x1)  =  TCB_IN_A
U1_A(x1, x2)  =  U1_A(x2)
TCA_IN_A(x1)  =  TCA_IN_A
U3_GA(x1, x2)  =  U3_GA(x2)
U4_GA(x1, x2)  =  U4_GA(x2)
U5_GA(x1, x2)  =  U5_GA(x2)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 0 SCCs with 8 less nodes.

(8) TRUE